<template>
  <div class="student">
    <el-container style="height: 100vh;">
      <!-- 头部 -->
      <el-header class="student-header">
        <div class="student-header-logo">
          <img src="../../assets/image/logo.webp" alt="logo" height="80%">
        </div>
        <span>学业导师助手</span>
        <div class="student-header-user">
          <img src="../../assets/image/studentUser.webp" alt="" height="80%">
          <span>{{studentName}}</span>
        </div>
      </el-header>
      <!-- 菜单 -->
      <el-container>
        <el-aside class="student-aside">
          <div class="forLayout"></div>
          <router-link to="/student/studentSituation" class="studySituation" active-class="student-aside-active">
            <el-icon style="color: white; font-size: 40px;"><Postcard /></el-icon>
            <span>学业情况</span>
          </router-link>
          <router-link to="/student/studentUser" class="studySituation" active-class="student-aside-active">
            <el-icon style="color: white; font-size: 40px;"><User /></el-icon>
            <span>个人中心</span>
          </router-link>
        </el-aside>
        <el-main style="margin: 0; padding: 0;">
          <RouterView></RouterView>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup>
import { Postcard,User } from '@element-plus/icons-vue';
import { ref } from 'vue';
import { RouterLink } from 'vue-router';

// localStorage.setItem('token',)

const studentName = ref('UserName')
</script>

<style scoped lang="scss">
// @use "@/common/scss/color" as color;
.student {
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;

  :deep(.student-header) {
    position: relative;
    width: 100%;
    height: 80px;
    min-height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    .student-header-logo {
      width: 12%;
      min-width: 160px;
      height: 100%;
      display: flex;
      align-items: center;
      justify-items: center;
      background-color: #e3e8ff;
      img {
        margin: auto;
      }
    }

    span {
      color: #b31219;
      font-size: 18px;
      font-weight: 700;
      margin-left: 20px;
    }

    .student-header-user {
      height: 100%;
      position: absolute;
      right: 50px;
      display: flex;
      align-items: center;
      img {
        border-radius: 50px;
      }
      span {
        color: black;
      }
    }
  }

  :deep(.student-aside) {
    width: 12%;
    min-width: 160px;
    background-color: #b5bbd7;
    .forLayout {
      height: 16vh;
      width: 100%;
    }
    .studySituation {
      width: 100%;
      height: 60px;
      display: flex;
      padding: 0 20px;
      align-items: center;
      justify-content: space-around;
      transition: background-color 0.4s ease-in-out;
      &:hover {
        background-color: #4c5fbc;
      }
      span {
        color: white;
        font-size: 20px;
        font-weight: 700;
      }
    }
    .student-aside-active {
      background-color: #4c5fbc;
      transition: all 0.2s;
    }
  }

}
</style>